package com.zsk.shop.controller.base;

import com.zsk.shop.common.base.BaseResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ys
 * @version 1.0
 * @date 2021/3/9 18:05
 */
@Slf4j
@RestController
@RequestMapping("/safe/safeLimit")
public class SafeLimitController {
    
    @RequestMapping("/limit.do")
    public BaseResponse<String> limit(){
        BaseResponse defaultResponse = new BaseResponse();
        defaultResponse.setCode(-1);
        defaultResponse.setMessage("访问太过频繁,已被加入黑名单");
        log.info("IpBlackAopInterceptor",  "已被加入黑名单，拒绝访问");
        return defaultResponse;
    }
}
